package com.neusoft.neuiotms.dcom.model.enums;

import java.util.Arrays;
import java.util.List;

import com.neusoft.neuiotms.common.constant.IDictionary;

public enum MaintainTaskSourceEnum implements IDictionary {
    period(1, "周期性任务"), // 任务来源于周期性任务
    temporary(2, "临时性任务"); // 任务来源于临时性任务

    private int value;
    private String label;

    private MaintainTaskSourceEnum(final int value, final String label) {
        this.value = value;
        this.label = label;
    }

    @Override
    public int getValue() {
        return this.value;
    }

    @Override
    public String getLabel() {
        return this.label;
    }

    public static MaintainTaskSourceEnum parse(final int value) {
        MaintainTaskSourceEnum result = null;
        switch (value) {
        case 1:
            result = MaintainTaskSourceEnum.period;
            break;
        case 2:
            result = MaintainTaskSourceEnum.temporary;
            break;
        }
        return result;
    }

    public static List<MaintainTaskSourceEnum> getEnumValues() {
        return Arrays.asList(MaintainTaskSourceEnum.values());
    }
}
